#ifndef CELLFORINDEX_H
#define CELLFORINDEX_H
#include<QPointF>
#include<QDebug>
#include<geomultilinestring.h>
#include<geomultipoint.h>
#include<geomultipolygon.h>

//索引的每一个矩形单元网格

class cellForIndex
{
public:
    cellForIndex();
    double minX,minY,maxX,maxY;//边界点数据
    bool isPointWithin(QPointF);
    bool conductIndex(geoObject*);
    QVector<geoObject*>getObjectWithin();
    bool isLeaf();
    QVector<cellForIndex*>getChildrenCell();
    bool addChildCell(cellForIndex*cell);
    cellForIndex* getChildCell(int i);
    bool setObjectsWithin(QVector<geoObject*>objects);

private:
    QVector<cellForIndex*>childrenCell;
    bool isLeafCell;
    double size;//网格大小
    QVector<geoObject*>objectsWithin;
};

#endif // CELLFORINDEX_H
